<?php
	include("includes/connect_db.php");

	$aksi = $_GET['aksi'];
	$id = $_POST['id_format'];

	$sql_idFormat = "SELECT * FROM tb_format WHERE id_format='$id'";
	$query_idFormat = mysql_query($sql_idFormat);
	$idFormat = mysql_fetch_array($query_idFormat);
	$idOperasi = $idFormat['id_operasi'];

	$sql_hapus = "DELETE FROM tb_format WHERE id_format='$id'";
	$query_hapus = mysql_query($sql_hapus);

	$sql_hapusOperasi = "DELETE FROM tb_operasi WHERE id_operasi='$idOperasi'";
	$query_hapusOperasi = mysql_query($sql_hapusOperasi);

	$sql_hapus = "DELETE FROM tb_tabel WHERE id_operasi='$idOperasi'";
	$query_hapus = mysql_query($sql_hapus);	

	$sql_hapus = "DELETE FROM tb_operasi_output WHERE id_operasi='$idOperasi'";
	$query_hapus = mysql_query($sql_hapus);	

	$sql_hapus = "DELETE FROM tb_operasi_parameter WHERE id_operasi='$idOperasi'";
	$query_hapus = mysql_query($sql_hapus);	
?>